package com.abbas.myviewtest.view;

import android.content.Context;
import android.util.AttributeSet;

import androidx.annotation.Nullable;

import com.abbas.myviewtest.view.model.Position;

/**
 * @author abbas
 * @description: TODO
 * @date 2022/3/29 19:34
 */
public class MyView2 extends androidx.appcompat.widget.AppCompatTextView {

    private Position position;
    private int number;

    public MyView2(Context context) {
        super(context);
    }

    public MyView2(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
    }

    public MyView2(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    public Position getPosition() {
        return position;
    }

    public void setPosition(Position position) {
        this.position = position;
    }

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
        this.setText(number+"");
    }

}
